#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

const int N = 100;
const int M = 1e9 + 7;

string s, t;

int main()
{
#ifdef LOCAL
    freopen("in.txt", "r", stdin);
    freopen("out.txt", "w", stdout);
#endif
    ios::sync_with_stdio(false), cin.tie(0);
    cin >> s >> t;
    if (s > t)
        cout << "Yes" << endl;
    else
        cout << "No" << endl;
    return 0;
}